import Foundation
@objcMembers open
class FYProductDetailResponse: FYBaseModel {
    public var data: FYProductDetailResponseData?
}
@objcMembers open
class FYProductDetailResponseData: FYBaseModel {
    public var amountDetailList: [FYProductDetailAmount] = []
    public var bankCardList: [FYProductDetailBankCard] = []
    public var productHotline: String = ""
    public var productId: String = ""
    public var productLogo: String = ""
    public var productName: String = ""
    public var productTermUnit: Int = 0
    public override func kj_didConvertToModel(from json: [String : Any]) {
        self.amountDetailList.sort(by: { ($0.loanAmount as NSString).integerValue > ($1.loanAmount as NSString).integerValue })
    }
}
@objcMembers open
class FYProductDetailAmount: FYBaseModel {
    public var loanAmount: String = ""
    public var termDetailList: [FYProductDetailAmountTerm] = []
    public override func kj_didConvertToModel(from json: [String : Any]) {
        self.termDetailList.sort(by: { $0.loanTerm < $1.loanTerm })
    }
    public override func sheetActionTitle() -> String {
        return (self.loanAmount as NSString).currencyGrouped()
    }
}
@objcMembers open
class FYProductDetailAmountTerm: FYBaseModel {
    public var arrivalAmount: String = ""
    public var borrowingDate: String = ""
    public var feeAmount: String = ""
    public var interestAmount: String = ""
    public var loanAmount: String = ""
    public var loanTerm: Int = 0
    public var productTermUnit: Int = 0
    public var repaymentAmount: String = ""
    public var repaymentDate: String = ""
    public var showTerm: Int = 0
    public var taxAmount: String = ""
    public var productTermItemList: [FYProductTermRepayPlanItem] = []
    public override func sheetActionTitle() -> String {
        return "\(self.showTerm) Days"
    }
}
@objcMembers open
class FYProductDetailBankCard: FYBaseModel {
    public var accountName: String = ""
    public var accountNo: String = ""
    public var accountPhone: String = ""
    public var accountType: String = ""
    public var bankCode: String = ""
    public var bankName: String = ""
    public var bindId: String = ""
    public var currency: String = ""
}
@objcMembers open
class FYProductTermRepayPlanItem: FYBaseModel {
    public var expirationDate: String = ""
    public var interestAmountDue: String = ""
    public var principalAmountDue: String = ""
    public var repaymentAmount: String = ""
}
